package com.zlx.xbhy.controller;

import com.zlx.xbhy.entity.Result;
import com.zlx.xbhy.service.IMailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName IMailController
 * @Description TODO
 * @Author Edward
 * @Date 2020/11/21 15:52
 */
@RestController
@RequestMapping("/email/")
public class IMailController {
    @Autowired
    private IMailService iMailService;

    @GetMapping("send/{email}")
    public Result sendEmail(@PathVariable String email){
        iMailService.sendSimpleMail(email);
        return new Result(true,"发送验证码已成功！",null);
    }

}
